<template>
    <div class="container">
        <!-- 渲染两种情况 -->
        <div class="content-main" v-if="btnTab == 0">
            <div class="content-main-son" v-for="item in data">
                <!-- <p>{{item}}</p> -->
                <div class="content-main-img">
                    <!-- <img src="./../assets/imgs/实验卡片／配图／1(2).png" alt=""> -->
                    <img :src="item.image" alt="">
                </div>
                <div class="content-main-text" :class="{ shadow: myShadow == 0 }">
                    有效绕过黑名单检测，尝试连接，寻找...
                    <!-- {{ item.name }} -->
                    <div class="content-main-text-bottom">
                        <div class="content-main-text-bottom-1">
                            恶意代码
                            <img src="./../assets/imgs/icon_zuijiandan.png" alt="">
                        </div>
                        <div class="content-main-text-bottom-2">
                            122人
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
</template>

<script lang='ts' setup>
import { log } from 'console';
import { reactive, ref } from 'vue'
const props = defineProps({
    data:{
        type:Object,
        default:()=>{}
    }
})

// const {data:dataList} = props.data
console.log(props);

const btnTab = ref<number>(0);

const myShadow = ref<number>(0);


</script>

<style lang='scss' scoped>
html,
body {
    padding: 0;
    margin: 0;
}

.container {
    padding-right: 0.75rem;
    // padding-left: 0.45rem;
    box-sizing: border-box;
    // margin-top: 0.65rem;
}

.tab-header {
    height: 1.125rem;
    display: flex;
    justify-content: center;
    align-items: center;

    .tab-header-son {
        width: 20%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

        .tab-header-son-1,
        .tab-header-son-2 {
            width: 50%;
            height: 100%;
            line-height: 1.125rem;
            text-align: center;
            font-size: 0.25rem;
        }

        .tab-header-son-1 {
            color: #7f7f7f;
            font-weight: bold;
            position: relative;
            .fix {
                width: 0.325rem;
                height: 0.325rem;
                border-bottom: 0.0625rem solid #139dff;
                position: absolute;
                bottom: -0.0375rem;
                left: 0.95rem;
            }

        }

        .tab2 {
            color: #222222;
            font-weight: bold;
        }
    }
}


.content-main {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minMax(0,1fr));
    
gap:10px;
    .content-main-son {
        // width: 5rem;
        height: 4.25rem;
        margin-bottom: 0.275rem;

        border-radius: 0.125rem;
        border: 0.0125rem solid rgb(206, 204, 204);

        .content-main-img {
            width: 100%;
            height: 70%;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .content-main-text {
            width: 100%;
            height: 30%;
            padding: 0.1rem;
            box-sizing: border-box;
            font-size: 0.1875rem;
            font-weight: bold;

            .content-main-text-bottom {
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 100%;
                height: 0.375rem;
                font-size: 0.125rem;
                color: #d8d8d8;
                margin-top: 0.125rem;

                .content-main-text-bottom-1 {
                    display: flex;
                    align-items: center;

                    img {
                        margin-left: 0.1rem;
                    }
                }
            }
        }

    }
}


.shadow {
    box-shadow: 0.0375rem 0.0375rem 0.125rem 0.025rem #eeecec, -0.0375rem -0.0375rem 0.125rem 0.025rem #eeecec;
}
</style>